#include <iostream>
#include <string>
using namespace std;

class Animal
{
public:
	string color;
	int weight;
};

class Dog : public Animal
{
public:
	string name;
	int age;
	void func();
};

int main()
{
	Dog dog;
	dog.name = "dog";
	dog.color = "red";
	dog.weight = 120;

	cout << "dog name is " << dog.name << endl;
	cout << "dog color is " << dog.color << endl;
	cout << "dog weight is " << dog.weight << endl;
	return 0;
}

void Dog::func()
{
	this->name = "wangcai";
	cout << "dog name is " << this->name << endl;
}

